The present invention relates to signal processing, and more particularly to the determination of a center value of a waveform signal.
Often it is necessary to determine a center value, such as a center wavelength, of a waveform signal to a high precision. The degree of precision required for different applications varies, but often precision better than 1 part in 300 of the full width at half max (FWHM) of the waveform signal is required. A simple technique to determine the center of a waveform signal is to use a centroid (or center of mass) calculation over an area of interest. For a discretely, evenly sampled waveform signal the basic equation for the calculation of the centroid is:                               V          C                =                                            ∑              N                        ⁢                                          V                N                            ·                              A                N                                                                        ∑              N                        ⁢                          A              N                                                          (        1        )            
where N is the total number of samples for each value (VN), and AN is the sampled amplitude. As seen in the above equation each sample point is weighted by the amplitude at that point. This calculation can be performed quickly on a sampled waveform signal and is therefore useful in real-time computer algorithms. Equation 1 can be used for example to determine the center wavelength (xcexC) of a waveform signal where a number N of discrete power level (PN) measurements are taken for each wavelength (xcexN).
The number of sampled points in the calculation is critical when using Equation 1, ideally the samples should span the entire waveform signal of interest. However, in practical applications this is not always possible due to factors such as sampling rates and memory requirements. In this case, a fixed number of sample points around the peak value of a waveform signal can be used. However, the locations of the sampled points will introduce errors in the determination of the waveform center provided the points are not perfectly symmetric around the waveform signal. FIGS. 1-3 illustrate examples of sampled waveform signals using a fixed number of points, i.e., seven (7) points. In the example of FIG. 1, the sample points are distributed symmetrically over the waveform signal. However, in FIG. 2, the sample points are shifted relative to the symmetrical sampling locations in FIG. 1 resulting in an asymmetric distribution of the points over the waveform signal and consequently an error in the determination of the center due to the weighting of all the points in Equation 1. FIG. 3 illustrates the extreme case, where again seven discrete sample points are shown. The first point will effectively skew the calculation from the correct value. FIG. 4 illustrates the error associated with asymmetric distribution of discrete sample points. In particular, FIG. 4 shows the percent error in the calculation from the FWHM versus the phase difference between the sampled points and the waveform signal. For a 0-degree phase difference, the peak of the waveform signal coincides exactly with the center-sampled point. For a 180-degree phase shift, the waveform peak is exactly between two sampled points.
The sample error can be reduced by increasing the number of sample points. However, as indicated above, the number of sample points, and therefore the accuracy of centroid determination, is limited by the sampling rate and the available memory. There therefore exists a need for an improved method of determining a center wavelength of an arbitrary waveform signal, particularly where the waveform signal is discretely sampled at a limited number of sample points.
Objects of the present invention include improved accuracy of the centroid calculation of a waveform signal.
According to a first embodiment of the present invention, a waveform signal is discretely sampled at a limited number of sample points, each sample point being a set (VN, AN) including a sample value (VN) and an amplitude (AN), and N being the number of non-eliminated sample points. Prior to performing a centroid calculation on the waveform signal, the last sample point (VN, AN) is eliminated if the magnitude of the amplitude at the first sample point (A1) is greater than the last sample point (AN), and the difference in magnitude between the first and last sample points (A1xe2x88x92AN) is greater than the difference in magnitude between the second to last sample point and the first sample point (ANxe2x88x921xe2x88x92A1). The first sample point (V1, A1) is eliminated prior to the centroid calculation if the magnitude of the amplitude at the last sample point (AN) is greater than the first sample point (A1), and the difference in magnitude between the last and first sample points (ANxe2x88x92A1) is greater than the difference in magnitude between the second sample point and the last sample point (A2xe2x88x92AN).
In accordance with a second embodiment of the invention, a first centroid calculation is found using a set of samples in which one side of the waveform signal has the lowest amplitude value sample. Sample values on the side of the waveform signal initially having the lowest amplitude value are then eliminated until the opposing side of the waveform has the lowest amplitude value sample. A second centroid calculation is then performed and the two centroid calculations are averaged together to arrive at an average centroid calculation of the waveform signal.
In accordance with a third embodiment of the invention, the amplitude components of the waveform signal sample values are normalized to the lowest amplitude value sample point and a first centroid calculation is performed on the normalized waveform. Next, the waveform is normalized to the lowest amplitude value sample point on the other side of the waveform signal and a second centroid calculation is performed. The two centroid calculations are then averaged to provide an averaged normalized centroid calculation.
The foregoing and other objects, features and advantages of the present invention will become more apparent in light of the following detailed description of exemplary embodiments thereof, as illustrated in the accompanying drawings.